package com.eigland.eigaland_lib.base

import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.Window
import androidx.fragment.app.DialogFragment
import com.eigland.eigaland_lib.R

public open class BaseDialogFragment : DialogFragment(){
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT));
        dialog?.requestWindowFeature(Window.FEATURE_NO_TITLE);
        var attr = dialog?.window?.attributes
        attr?.windowAnimations = R.style.BottomDialogAnimation
        dialog?.window?.attributes = attr

        return super.onCreateView(inflater, container, savedInstanceState)
    }
}